<template>
  <div class="daily-container">
    <el-card class="daily-card">
      <template #header>
        <div class="card-header">
          <span>布布的每日安排</span>
          <el-button type="primary" @click="addTask">添加安排</el-button>
        </div>
      </template>
      <el-timeline>
        <el-timeline-item
          v-for="(activity, index) in activities"
          :key="index"
          :timestamp="activity.time"
          :type="activity.type"
        >
          {{ activity.content }}
        </el-timeline-item>
      </el-timeline>
    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const activities = ref([
  {
    content: '起床啦，新的一天开始咯~',
    time: '07:30',
    type: 'primary'
  },
  {
    content: '吃早餐时间到！',
    time: '08:00',
    type: 'success'
  },
  {
    content: '玩玩具时间',
    time: '09:00',
    type: 'info'
  },
  {
    content: '午餐时间~',
    time: '12:00',
    type: 'success'
  },
  {
    content: '午睡时间',
    time: '13:00',
    type: 'warning'
  }
])

const addTask = () => {
  // 添加新任务的逻辑
}
</script>

<style scoped>
.daily-container {
  padding: 20px;
}

.daily-card {
  max-width: 800px;
  margin: 0 auto;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style> 